﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmProduccionArmado.aspx.cs" Inherits="Crosland.Automotriz.Web.Vehiculos.wFrmProduccionArmado" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel"
    TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

<div class="main-header" style="width:100%;">
                <div class="main-titulo">Armado de Vehiculos</div>
</div>

<div class="content-form">

         <table>
     
         <tr>
            <td>
                <dx:ASPxButton ID="btnNuevo" runat="server" Text="Nuevo" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100px" HorizontalAlign="Center" onclick="btnNuevo_Click">
                     <Image Url="~/Images/bt_new_button.gif">
                    </Image>
                </dx:ASPxButton> 
            </td>
           
         </tr>

         </table>

         <div style="clear:both;height:15px"></div>

    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="450px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
             EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" HeaderText="Datos de Consulta" 
             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
        <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
        <HeaderStyle>
        <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
        </HeaderStyle>
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
 <table>
     <tr>
        <td>

            Local:</td>

        <td>
        
            <dx:ASPxComboBox ID="cboCentro" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" Spacing="0" 
                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                </LoadingPanelImage>
                <LoadingPanelStyle ImageSpacing="5px">
                </LoadingPanelStyle>
                <ButtonStyle Width="13px">
                </ButtonStyle>
            </dx:ASPxComboBox>
        
        </td>

        <td>
            &nbsp;</td>
         
        <td>
        
            &nbsp;</td>

     </tr>
     <tr>
         <td>
             <dx:ASPxLabel ID="ASPxLabel1" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                 Text="Estado del Armado:">
             </dx:ASPxLabel>
         </td>
         <td>
             <dx:ASPxComboBox ID="cboEstado" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" Spacing="0" 
                 SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                 <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                 </LoadingPanelImage>
                 <LoadingPanelStyle ImageSpacing="5px">
                 </LoadingPanelStyle>
                 <ButtonStyle Width="13px">
                 </ButtonStyle>
             </dx:ASPxComboBox>
         </td>
         <td>
         </td>
         <td>
             &nbsp;</td>
     </tr>
     <tr>
         <td>
             Bahia Armado:</td>
         <td>
             <dx:ASPxComboBox ID="cboEquipo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" Spacing="0" 
                 SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                 <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                 </LoadingPanelImage>
                 <LoadingPanelStyle ImageSpacing="5px">
                 </LoadingPanelStyle>
                 <ButtonStyle Width="13px">
                 </ButtonStyle>
             </dx:ASPxComboBox>
         </td>
         <td>
             &nbsp;</td>
         <td>
             <dx:ASPxButton ID="btnBuscar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                 HorizontalAlign="Center" OnClick="btnBuscar_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Buscar" Width="100px">
                 <Image Url="~/Images/search.png">
                 </Image>
             </dx:ASPxButton>
         </td>
     </tr>
 </table>


</dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>

    <div style="clear:both;height:15px"></div>

    <dx:ASPxGridView ID="dgvDatosArmados" runat="server" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
             CssPostfix="Office2010Blue" Width="800px" 
             AutoGenerateColumns="False" ClientInstanceName="dgvDatosArmados" 
             KeyFieldName="ID_ARM_CAB" onrowcommand="dgvDatosArmados_RowCommand" 
             onpageindexchanged="dgvDatosArmados_PageIndexChanged" 
             onhtmlrowcreated="dgvDatosArmados_HtmlRowCreated">
        <Columns>
            <dx:GridViewDataTextColumn Caption="Usuario" FieldName="USUARIO" VisibleIndex="0" Width="120px">
                <Settings AllowSort="False" />
                <HeaderStyle HorizontalAlign="Center" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Fec.Inicio" FieldName="FEC_INI_ARM" 
                VisibleIndex="4" Width="140px">
                <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy  hh:mm:ss">
                </PropertiesTextEdit>
                <Settings AllowSort="False" />
                <HeaderStyle HorizontalAlign="Center" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Fec.Fin" FieldName="FEC_FIN_ARM" 
                VisibleIndex="5" Width="140px">
                <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy  hh:mm:ss">
                </PropertiesTextEdit>
                <Settings AllowSort="False" />
                <HeaderStyle HorizontalAlign="Center" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="ID" FieldName="ID_ARM_CAB" 
                VisibleIndex="7" Width="50px" Visible="False">
                <Settings AllowSort="False" />
            </dx:GridViewDataTextColumn>

            <dx:GridViewDataTextColumn Caption="Reiniciar" VisibleIndex="8" Width="50px">
                                         <DataItemTemplate>
                                             <asp:ImageButton ID="btnReiniciar" runat="server" 
                                                 CommandArgument='<%# Bind("ID_ARM_CAB") %>' CommandName="Reiniciar" 
                                                 ImageUrl="~/Images/clock_play.png" ImageAlign="Middle" />
                                         </DataItemTemplate>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Center">
                                         </CellStyle>
                </dx:GridViewDataTextColumn>

                <dx:GridViewDataTextColumn Caption="Terminar" VisibleIndex="9" 
                Width="50px">
                                         <DataItemTemplate>
                                             <asp:ImageButton ID="btnTerminar" runat="server" 
                                                 CommandArgument='<%# Bind("ID_ARM_CAB") %>' CommandName="Terminar" 
                                                 ImageUrl="~/Images/clock_stop.png" ImageAlign="Middle" />
                                         </DataItemTemplate>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Center">
                                         </CellStyle>
                </dx:GridViewDataTextColumn>

                <dx:GridViewDataTextColumn Caption="Anular" VisibleIndex="10" Width="50px">
                                         <DataItemTemplate>
                                             <asp:ImageButton ID="btnAnular" runat="server" 
                                                 CommandArgument='<%# Bind("ID_ARM_CAB") %>' CommandName="Anular" 
                                                 ImageUrl="~/Images/clock_red.png" ImageAlign="Middle" />
                                         </DataItemTemplate>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Center">
                                         </CellStyle>
                </dx:GridViewDataTextColumn>

                <dx:GridViewDataTextColumn Caption="Equipo" VisibleIndex="11" Width="50px">
                                         <DataItemTemplate>
                                             <asp:ImageButton ID="btnEquipo" runat="server" 
                                                 CommandArgument='<%# Bind("ID_ARM_CAB") %>' CommandName="Equipo" 
                                                 ImageUrl="~/Images/group.png" ImageAlign="Middle" />
                                         </DataItemTemplate>
                                         <HeaderStyle HorizontalAlign="Center" />
                                         <CellStyle HorizontalAlign="Center">
                                         </CellStyle>
                </dx:GridViewDataTextColumn>


            <dx:GridViewDataTextColumn Caption="Duración" FieldName="TIEMPO_DURACION" 
                VisibleIndex="6" Width="50px">
                <Settings AllowSort="False" />
                <HeaderStyle HorizontalAlign="Center" />
                <CellStyle HorizontalAlign="Center">
                </CellStyle>
            </dx:GridViewDataTextColumn>

        </Columns>
        <SettingsBehavior AllowFocusedRow="True" />
        <SettingsPager PageSize="30">
        </SettingsPager>
        <SettingsDetail ShowDetailRow="True" />
        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesPager>
            <PageNumber ForeColor="#3E4846">
            </PageNumber>
            <Summary ForeColor="#1E395B">
            </Summary>
        </StylesPager>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
        <Templates>
            <DetailRow>
                <dx:ASPxGridView ID="gvDetalleArmado" runat="server" 
                    AutoGenerateColumns="False" ClientInstanceName="gvDetalleArmado" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" DataSourceID="ObjectDataSource1" 
                    KeyFieldName="ID_ARM_CAB" 
                    onbeforeperformdataselect="gvDetalleArmado_BeforePerformDataSelect" 
                    Width="850px">
                    <Columns>
                        <dx:GridViewDataTextColumn FieldName="ID_ARM_DET" Visible="False" 
                            VisibleIndex="0">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="ID_ARM_CAB" Visible="False" 
                            VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="NroLote" FieldName="NRO_LOTE" 
                            VisibleIndex="7">
                            <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Duración" FieldName="DUR_ITEM" 
                            VisibleIndex="8" Width="50px">
                            <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Nro.Chasis" FieldName="NRO_CHASIS" 
                            VisibleIndex="4">
                            <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Nro.Motor" FieldName="NRO_MOTOR" 
                            VisibleIndex="6">
                            <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Cliente" FieldName="DES_CLIENTE" 
                            VisibleIndex="10">
                            <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Cod.Material" FieldName="COD_MATERIAL" 
                            VisibleIndex="2">
                            <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" 
                            VisibleIndex="11">
                            <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                        <LoadingPanel ImageSpacing="5px">
                        </LoadingPanel>
                    </Styles>
                    <StylesPager>
                        <PageNumber ForeColor="#3E4846">
                        </PageNumber>
                        <Summary ForeColor="#1E395B">
                        </Summary>
                    </StylesPager>
                    <StylesEditors ButtonEditCellSpacing="0">
                        <ProgressBar Height="21px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
            </DetailRow>
        </Templates>
    </dx:ASPxGridView>



         <br />
         <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
             SelectMethod="DetalleVehiArmado" 
             
             TypeName="Crosland.Automotriz.Facade.Facade.FacadeProduccionArmadoVehiculos">
             <SelectParameters>
                 <asp:SessionParameter Name="idCab" SessionField="ID_ARM_CAB" 
                     Type="Int32" />
             </SelectParameters>
         </asp:ObjectDataSource>

         <br />
         <dx:ASPxPopupControl ID="popupConfirmacion" runat="server" AllowDragging="True" ClientInstanceName="popupConfirmacion" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" EnableViewState="False" HeaderText="Confirmación" Modal="True" 
             PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
             Width="300px">
             <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
             </LoadingPanelImage>
             <HeaderStyle>
             <Paddings PaddingLeft="7px" />
             </HeaderStyle>
             <LoadingPanelStyle ImageSpacing="5px">
             </LoadingPanelStyle>
             <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">

<table style="width: 271px">
    <tr>
    <td colspan="2">
    <center>
        Esta seguro de realizar esta acción?.</center>
    </td>
    
    </tr>
    <tr>
        <td colspan="2">
            &nbsp;</td>
    </tr>

    <tr>
        <td>
        <center>
            <dx:ASPxButton ID="btnSI" runat="server" ClientInstanceName="btnSI" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="SI" OnClick="btnSI_Click">
                <ClientSideEvents Click="function(s, e) {
	popupConfirmacion.Hide();
}" />
            </dx:ASPxButton>
        </center>
        </td>
        <td>
        <center>
            <dx:ASPxButton ID="btnNO" runat="server" AutoPostBack="False" ClientInstanceName="btnNO" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="NO">
                <ClientSideEvents Click="function(s, e) {
	popupConfirmacion.Hide();
}" />
            </dx:ASPxButton>
        </center>
        </td>
    </tr>

</table>

</dx:PopupControlContentControl>
</ContentCollection>
         </dx:ASPxPopupControl>



         <br />
         <br />
         <dx:ASPxPopupControl ID="popupMsj" runat="server" AllowDragging="True" ClientInstanceName="popupMsj" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" EnableViewState="False" HeaderText="Mensaje" Modal="True" 
             PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="300px">
             <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
             </LoadingPanelImage>
             <HeaderStyle>
             <Paddings PaddingLeft="7px" />
             </HeaderStyle>
             <LoadingPanelStyle ImageSpacing="5px">
             </LoadingPanelStyle>
             <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">

<table style="width: 271px">
    <tr>
    <td>
    <center>
        <dx:ASPxLabel ID="lblMsj" runat="server" Text="">
        </dx:ASPxLabel>
    </center>
    </td>
    
    </tr>
    <tr>
        <td>
            &nbsp;</td>
    </tr>

    <tr>
        <td>
        <center>
            <dx:ASPxButton ID="btnOK" runat="server" ClientInstanceName="btnOk" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="OK">
                <ClientSideEvents Click="function(s, e) {
	popupMsj.Hide();
}" />
            </dx:ASPxButton>
        </center>
        </td>
    </tr>

</table>

</dx:PopupControlContentControl>
</ContentCollection>
         </dx:ASPxPopupControl>



         <br />
         <dx:ASPxPopupControl ID="popupEquipo" runat="server" AllowDragging="True" 
             ClientInstanceName="popupEquipo" CloseAction="CloseButton" 
             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
             CssPostfix="Office2010Blue" HeaderText="Equipo Armado" Height="95px" 
             PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="184px">
             <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
             </LoadingPanelImage>
             <HeaderStyle>
             <Paddings PaddingLeft="7px" />
             </HeaderStyle>
             <LoadingPanelStyle ImageSpacing="5px">
             </LoadingPanelStyle>
             <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <dx:ASPxGridView ID="gvEquipos" runat="server" AutoGenerateColumns="False" 
        ClientInstanceName="gvEquipos" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" Width="180px">
        <Columns>
            <dx:GridViewDataTextColumn Caption="IdCab" FieldName="ID_ARM_CAB" 
                ShowInCustomizationForm="True" Visible="False" VisibleIndex="0">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Usuario" FieldName="USUARIO" 
                ShowInCustomizationForm="True" VisibleIndex="1">
                <HeaderStyle HorizontalAlign="Center" />
            </dx:GridViewDataTextColumn>
        </Columns>
        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesPager>
            <PageNumber ForeColor="#3E4846">
            </PageNumber>
            <Summary ForeColor="#1E395B">
            </Summary>
        </StylesPager>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
                 </dx:PopupControlContentControl>
</ContentCollection>
         </dx:ASPxPopupControl>
         <br />



</div>

</asp:Content>
